package net.xdclass.service;

import net.xdclass.enums.ProductOrderPayTypeEnum;
import net.xdclass.model.ProductOrderDO;
import com.baomidou.mybatisplus.extension.service.IService;
import net.xdclass.request.ConfirmOrderRequest;
import net.xdclass.request.RepayOrderRequest;
import net.xdclass.util.JsonData;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 孙浩
 * @since 2022-05-11
 */
public interface ProductOrderService{

  /**
   * 提交订单
   * @param orderRequest
   * @return
   */
  JsonData confirmOrder(ConfirmOrderRequest orderRequest);

  /**
   * 查询订单状态
   * @param outTradeNo
   * @return
   */
  JsonData queryProductOrderState(String outTradeNo);


  boolean releaseOrder(Long orderId);

  JsonData handlerOrderCallBack(ProductOrderPayTypeEnum alipay, Map<String, String> requestMap);

  Map<String, Object> pageOrder(Integer page, Integer size, String state);

  JsonData repayOrder(RepayOrderRequest repayOrderRequest);
}
